package org.lds.hotkey.console.business.hotkey.model.request;

import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;
import org.apache.commons.lang3.StringUtils;
import org.lds.hotkey.common.model.pojo.PageCondition;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * 分页 - 请求
 *
 * @author lidongsheng
 * @since 2024-06-18
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
@Builder
@Accessors(chain = true)
public class HotKeyBaseListPageRequest extends PageCondition implements Serializable {
    private static final long serialVersionUID = 1L;
    /**
    * 主键
    */
    private Long id;

    /**
    * app主键
    */
    private Long appId;

    /**
    * 名称
    */
    private String key;

    public void setKey(String key) {
        this.key = StringUtils.trimToNull(key);
    }
    /**
    * 开关 1：启用 0：停用
    */
    private Boolean enable;

    /**
    * 缓存时间（秒）
    */
    private Integer duration;

    /**
    * 描述
    */
    private String desc;

    public void setDesc(String desc) {
        this.desc = StringUtils.trimToNull(desc);
    }
    /**
    * 创建时间
    */
    private LocalDateTime createTime;

    /**
    * 修改时间
    */
    private LocalDateTime updateTime;

}
